#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file https://www.gnu.org/licenses/gpl-3.0.txt

from pisi.actionsapi import shelltools, pisitools

def setup():
	pass

def build():
	shelltools.system("gcc -O2 -fPIC -DMPACK_USE_SYSTEM -I/usr/include/lua -c lmpack.c -o lmpack.o")
	shelltools.system("gcc -shared -lmpack -o mpack.so lmpack.o")

def install():
	pisitools.insinto("/usr/lib/lua/5.4", "mpack.so")
